

use fighting_2d::{self, data::common::MultiJson};

static mut CHARACTER_MANAGER: ::once_cell::sync::Lazy<fighting_2d::data::character::GameCharacterManager>
    = ::once_cell::sync::Lazy::new(|| fighting_2d::data::character::GameCharacterManager::default()
        /*
        {
            let m = fighting_2d::character::GameCharacterManager::from_multi_json("./character");
            if m.is_none() { panic!("character manager init error"); }
            m.unwrap()
        }
        */
    );

static mut CHARACTER_DIR_PATH: String = String::new();
static mut ANIMATION_DIR_PATH: String = String::new();


pub unsafe fn init(character_dir_path: &str, animation_dir: &str)
{
    CHARACTER_DIR_PATH = character_dir_path.to_string();
    ANIMATION_DIR_PATH = animation_dir.to_string();
    CHARACTER_MANAGER = ::once_cell::sync::Lazy::new(|| {
        let m = fighting_2d::data::character::GameCharacterManager::from_multi_json(unsafe { &CHARACTER_DIR_PATH });
        if m.is_none() { panic!("character manager init error"); }
        m.unwrap()
    });
    fighting_2d::data::common::console::flush();
}




pub fn main_loop()
{
    let mut player: Option<fighting_2d::data::character::GameCharacter> = Option::None;
}


